<?php
use Mirage\Abstraction\AbstractKernel;
use Mirage\Base\DB;
use Mirage\Base\Config;
/**
 * Description of AppKernel
 *
 * @author Bryan Salazar
 */
class AppKernel extends AbstractKernel
{
    public function registeredModule() 
    {
        return array(
            'front'=>'FrontModule',
            'movie'=>'MovieManagerModule',
            'report'=>'AccomReportModule',
            
        );
    }
    
    public function startup()
    {
        @session_start();
        $config = include_once __DIR__ . DIRECTORY_SEPARATOR . 'config.php';
        Config::app()->setConfig($config);
        $db = Config::app()->param['movie'];
        DB::app('movie')->setConfig($db['dsn'], $db['username'], $db['password']);
        $db2 = Config::app()->param['report'];
        DB::app('report')->setConfig($db2['dsn'], $db2['username'], $db2['password']);
    }
    
    public function shutdown() 
    {
        
    }
}
